package com.knowif.pojo;

import java.util.List;

/**
 * 
 * 
 * @author wcyong
 * 
 * @date 2019-06-14
 */
public class School {
    private Integer id;

    private Integer cityId;

    private String cityName;

    private Integer f211;

    private Integer f985;

    private Integer provinceId;

    /**
     * 排名
     */
    private String rankNum;

    /**
     * 类型排名
     */
    private Integer rankType;

    /**
     * 类型编码
     */
    private Integer schoolId;

    /**
     * 学校名
     */
    private String schoolName;

    /**
     * 类型编码
     */
    private Integer type;

    /**
     * 类型名
     */
    private String typeName;

    /**
     * 国家id
     */
    private Integer countryId;

    /**
     * 国家名称
     */
    private String countryName;

    /**
     * 洲id
     */
    private Integer continentId;

    /**
     * 洲名
     */
    private String continentName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCityId() {
        return cityId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName == null ? null : cityName.trim();
    }

    public Integer getF211() {
        return f211;
    }

    public void setF211(Integer f211) {
        this.f211 = f211;
    }

    public Integer getF985() {
        return f985;
    }

    public void setF985(Integer f985) {
        this.f985 = f985;
    }

    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    public String getRankNum() {
        return rankNum;
    }

    public void setRankNum(String rankNum) {
        this.rankNum = rankNum == null ? null : rankNum.trim();
    }

    public Integer getRankType() {
        return rankType;
    }

    public void setRankType(Integer rankType) {
        this.rankType = rankType;
    }

    public Integer getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Integer schoolId) {
        this.schoolId = schoolId;
    }

    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName == null ? null : schoolName.trim();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName == null ? null : typeName.trim();
    }

    public Integer getCountryId() {
        return countryId;
    }

    public void setCountryId(Integer countryId) {
        this.countryId = countryId;
    }

    public String getCountryName() {
        return countryName;
    }

    public void setCountryName(String countryName) {
        this.countryName = countryName == null ? null : countryName.trim();
    }

    public Integer getContinentId() {
        return continentId;
    }

    public void setContinentId(Integer continentId) {
        this.continentId = continentId;
    }

    public String getContinentName() {
        return continentName;
    }

    public void setContinentName(String continentName) {
        this.continentName = continentName == null ? null : continentName.trim();
    }
    
    
    public static String getSchoolName(List<School> schools,int schoolId){
    	if(schools == null || schools.isEmpty()){
    		return null;
    	}
    	for(School school : schools){
    		if(school.getSchoolId() != null && school.getSchoolId().equals(schoolId)){
    			return school.getSchoolName();
    		}
    	}
    	return null;
    }
    
    
    public static String getcountryName(List<School> schools,int schoolId){
    	if(schools == null || schools.isEmpty()){
    		return null;
    	}
    	for(School school : schools){
    		if(school.getSchoolId() != null && school.getSchoolId().equals(schoolId)){
    			return school.getCountryName();
    		}
    	}
    	return null;
    }
}